﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApp2
{
        class Program
        {
            public string Name { get; set; }
            public char Sex { get; set; }
            public int Age { get; set; }
            public static string Teacher { get; set; }

            public void Test()
            {
                Console.WriteLine("名字：{0}", this.Name);
                Console.WriteLine("性别：{0}", this.Sex);
                Console.WriteLine("年龄：{0}", this.Age);
                Console.WriteLine("老师：{0}", Teacher);
                Console.WriteLine("\t");
            }
            public Program(string name, char sex, int age, string teacher)
            {
                this.Name = name;
                this.Sex = sex;
                this.Age = age;
                Teacher = teacher;
            }
            static void Main(string[] args)
            {
                Program a = new Program("张三", '男', 18, "唐僧");
                Program s = new Program("李四", '男', 20, "唐僧");
                Program d = new Program("王五", '男', 25, "唐僧");
                a.Test();
                s.Test();
                d.Test();
                Console.WriteLine("更改后：");
                Teacher = "嫦娥";
                a.Test();
                s.Test();
                d.Test();
            Console.ReadKey();
        }
        
        }
    
}
